.class public Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;
.super Landroid/graphics/drawable/Drawable;
.source "RoundedImageView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/pop/app/unlock/RoundedImageView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation


# instance fields
.field protected final a:F

.field protected final b:Landroid/graphics/RectF;

.field protected final c:Landroid/graphics/RectF;

.field protected final d:Landroid/graphics/BitmapShader;

.field protected final e:Landroid/graphics/Paint;

.field private f:I


# direct methods
.method public constructor <init>(Landroid/graphics/Bitmap;II)V
    .locals 1

    .line 1
    invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V

    .line 2
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    int-to-float p2, p2

    .line 3
    iput p2, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    .line 4
    iput p3, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->f:I

    .line 5
    new-instance p2, Landroid/graphics/BitmapShader;

    sget-object p3, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;

    invoke-direct {p2, p1, p3, p3}, Landroid/graphics/BitmapShader;-><init>(Landroid/graphics/Bitmap;Landroid/graphics/Shader$TileMode;Landroid/graphics/Shader$TileMode;)V

    iput-object p2, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->d:Landroid/graphics/BitmapShader;

    .line 6
    new-instance p2, Landroid/graphics/RectF;

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result p3

    int-to-float p3, p3

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result p1

    int-to-float p1, p1

    const/4 v0, 0x0

    invoke-direct {p2, v0, v0, p3, p1}, Landroid/graphics/RectF;-><init>(FFFF)V

    iput-object p2, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->c:Landroid/graphics/RectF;

    .line 7
    new-instance p1, Landroid/graphics/Paint;

    invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    const/4 p2, 0x1

    .line 8
    invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 9
    iget-object p1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->d:Landroid/graphics/BitmapShader;

    invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;

    return-void
.end method


# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
    .locals 8

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    iget v1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    iget-object v2, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v1, v2}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 2
    iget v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->f:I

    xor-int/lit8 v0, v0, 0xf

    and-int/lit8 v1, v0, 0x1

    if-eqz v1, :cond_0

    const/4 v3, 0x0

    const/4 v4, 0x0

    .line 3
    iget v6, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    iget-object v7, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    move-object v2, p1

    move v5, v6

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    :cond_0
    and-int/lit8 v1, v0, 0x2

    if-eqz v1, :cond_1

    .line 4
    iget-object v1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    iget v5, v1, Landroid/graphics/RectF;->right:F

    iget v6, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    sub-float v3, v5, v6

    const/4 v4, 0x0

    iget-object v7, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    move-object v2, p1

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    :cond_1
    and-int/lit8 v1, v0, 0x4

    if-eqz v1, :cond_2

    const/4 v3, 0x0

    .line 5
    iget-object v1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    iget v6, v1, Landroid/graphics/RectF;->bottom:F

    iget v5, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    sub-float v4, v6, v5

    iget-object v7, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    move-object v2, p1

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    :cond_2
    and-int/lit8 v0, v0, 0x8

    if-eqz v0, :cond_3

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    iget v4, v0, Landroid/graphics/RectF;->right:F

    iget v1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->a:F

    sub-float v2, v4, v1

    iget v5, v0, Landroid/graphics/RectF;->bottom:F

    sub-float v3, v5, v1

    iget-object v6, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    move-object v1, p1

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    :cond_3
    return-void
.end method

.method public getOpacity()I
    .locals 1

    const/4 v0, -0x3

    return v0
.end method

.method protected onBoundsChange(Landroid/graphics/Rect;)V
    .locals 3

    .line 1
    invoke-super {p0, p1}, Landroid/graphics/drawable/Drawable;->onBoundsChange(Landroid/graphics/Rect;)V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v1

    int-to-float v1, v1

    invoke-virtual {p1}, Landroid/graphics/Rect;->height()I

    move-result p1

    int-to-float p1, p1

    const/4 v2, 0x0

    invoke-virtual {v0, v2, v2, v1, p1}, Landroid/graphics/RectF;->set(FFFF)V

    .line 3
    new-instance p1, Landroid/graphics/Matrix;

    invoke-direct {p1}, Landroid/graphics/Matrix;-><init>()V

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->c:Landroid/graphics/RectF;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->b:Landroid/graphics/RectF;

    sget-object v2, Landroid/graphics/Matrix$ScaleToFit;->FILL:Landroid/graphics/Matrix$ScaleToFit;

    invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Matrix;->setRectToRect(Landroid/graphics/RectF;Landroid/graphics/RectF;Landroid/graphics/Matrix$ScaleToFit;)Z

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->d:Landroid/graphics/BitmapShader;

    invoke-virtual {v0, p1}, Landroid/graphics/BitmapShader;->setLocalMatrix(Landroid/graphics/Matrix;)V

    return-void
.end method

.method public setAlpha(I)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setAlpha(I)V

    return-void
.end method

.method public setColorFilter(Landroid/graphics/ColorFilter;)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/unlock/RoundedImageView$a;->e:Landroid/graphics/Paint;

    invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;

    return-void
.end method
